package com.melody.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.melody.entry.MusicLyric;
import com.melody.service.MusicLyricService;
import com.melody.mapper.MusicLyricMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
* @author zxz
* @description 针对表【music_lyric(歌词表)】的数据库操作Service实现
* @createDate 2025-05-09 10:31:17
*/
@Service
public class MusicLyricServiceImpl extends ServiceImpl<MusicLyricMapper, MusicLyric>
    implements MusicLyricService{

    @Autowired
    private MusicLyricMapper musicLyricMapper;

    @Override
    public MusicLyric getLyricById(Integer musicId)
    {
        return musicLyricMapper.getLyricById(musicId);
    }

    @Override
    public MusicLyric addLyric(MusicLyric musicLyric) {
        //mybatis-plus实现插入歌词
        save(musicLyric);
        return musicLyric;
    }
}




